Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RGBLIGHT_DEFAULT_ON macro configuration option #20857

Merged
merged 9 commits into from
Sep 29, 2023

Conversation

Gondolindrim
Copy link
Contributor

@Gondolindrim Gondolindrim commented May 11, 2023

Description

Adds the possibility of defining RGB lighting disabled by deafult at EEPROM initialization.

This is done through a macro in config.h:

#define RGBLIGHT_DEFAULT_ON false

The macro works in the rgblight.c quantum driver setting enable to true if the macro is not enabled and false if it is.

An accompanying addition to the documentation is also pushed.

This was tested on a couple PCBs around; all STM32 though, but I am sure this should not pose an issue for the AVR units.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@Gondolindrim Gondolindrim marked this pull request as ready for review May 19, 2023 03:15
@drashna drashna requested a review from a team May 29, 2023 02:06
Copy link
Member

@fauxpark fauxpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking this should be inverted and default to true to be consistent with the other defines:

#if !defined(RGBLIGHT_DEFAULT_ON)
#    define RGBLIGHT_DEFAULT_ON true
#endif

@Gondolindrim
Copy link
Contributor Author

I'm thinking this should be inverted and default to true to be consistent with the other defines:

#if !defined(RGBLIGHT_DEFAULT_ON)
#    define RGBLIGHT_DEFAULT_ON true
#endif

So the idea would be, if I want the RGB off by default I'd use

#undef RGBLIGHT_DEFAULT_ON

?

@fauxpark
Copy link
Member

No, you'd set it to false.

Co-authored by: fauxpark
@Gondolindrim
Copy link
Contributor Author

No, you'd set it to false.

Done in c253989

docs/feature_rgblight.md Outdated Show resolved Hide resolved
quantum/rgblight/rgblight.c Outdated Show resolved Hide resolved
quantum/rgblight/rgblight.c Outdated Show resolved Hide resolved
quantum/rgblight/rgblight.c Outdated Show resolved Hide resolved
Co-authored-by: Ryan <fauxpark@gmail.com>
docs/feature_rgblight.md Outdated Show resolved Hide resolved
quantum/rgblight/rgblight.c Outdated Show resolved Hide resolved
quantum/rgblight/rgblight.c Outdated Show resolved Hide resolved
Gondolindrim and others added 3 commits June 3, 2023 01:22
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
@github-actions
Copy link

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@github-actions github-actions bot added the stale Issues or pull requests that have become inactive without resolution. label Aug 31, 2023
@zvecr zvecr changed the title Add RGB_DEFAULT_DISABLED macro configuration option Add RGBLIGHT_DEFAULT_ON macro configuration option Sep 8, 2023
@github-actions github-actions bot removed the stale Issues or pull requests that have become inactive without resolution. label Sep 9, 2023
@drashna drashna self-requested a review September 9, 2023 06:09
@zvecr zvecr merged commit 2eed1f5 into qmk:develop Sep 29, 2023
4 checks passed
mechlovin pushed a commit to mechlovin/qmk_firmware that referenced this pull request Oct 25, 2023
* ADD RGB_DEFAULT_DISABLED option and updated documentation

* Formatting

* Add  as by fauxpark's suggestion

Co-authored by: fauxpark

* Formatting

* Use boolean values instead of numerical

Co-authored-by: Ryan <fauxpark@gmail.com>

* Edit documentation formatting

Co-authored-by: Ryan <fauxpark@gmail.com>

* Remove comment

Co-authored-by: Ryan <fauxpark@gmail.com>

* Set RGB mode to DEFAULT macro at init

Co-authored-by: Ryan <fauxpark@gmail.com>

---------

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: zvecr <git@zvecr.com>
christrotter pushed a commit to christrotter/qmk_firmware that referenced this pull request Nov 28, 2023
* ADD RGB_DEFAULT_DISABLED option and updated documentation

* Formatting

* Add  as by fauxpark's suggestion

Co-authored by: fauxpark

* Formatting

* Use boolean values instead of numerical

Co-authored-by: Ryan <fauxpark@gmail.com>

* Edit documentation formatting

Co-authored-by: Ryan <fauxpark@gmail.com>

* Remove comment

Co-authored-by: Ryan <fauxpark@gmail.com>

* Set RGB mode to DEFAULT macro at init

Co-authored-by: Ryan <fauxpark@gmail.com>

---------

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: zvecr <git@zvecr.com>
zgagnon pushed a commit to zgagnon/qmk_firmware_waterfowl that referenced this pull request Dec 15, 2023
* ADD RGB_DEFAULT_DISABLED option and updated documentation

* Formatting

* Add  as by fauxpark's suggestion

Co-authored by: fauxpark

* Formatting

* Use boolean values instead of numerical

Co-authored-by: Ryan <fauxpark@gmail.com>

* Edit documentation formatting

Co-authored-by: Ryan <fauxpark@gmail.com>

* Remove comment

Co-authored-by: Ryan <fauxpark@gmail.com>

* Set RGB mode to DEFAULT macro at init

Co-authored-by: Ryan <fauxpark@gmail.com>

---------

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: zvecr <git@zvecr.com>
future-figs pushed a commit to future-figs/qmk_firmware that referenced this pull request Dec 27, 2023
* ADD RGB_DEFAULT_DISABLED option and updated documentation

* Formatting

* Add  as by fauxpark's suggestion

Co-authored by: fauxpark

* Formatting

* Use boolean values instead of numerical

Co-authored-by: Ryan <fauxpark@gmail.com>

* Edit documentation formatting

Co-authored-by: Ryan <fauxpark@gmail.com>

* Remove comment

Co-authored-by: Ryan <fauxpark@gmail.com>

* Set RGB mode to DEFAULT macro at init

Co-authored-by: Ryan <fauxpark@gmail.com>

---------

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: zvecr <git@zvecr.com>
mute-civilian pushed a commit to mute-civilian/qmk_firmware that referenced this pull request Feb 17, 2024
* ADD RGB_DEFAULT_DISABLED option and updated documentation

* Formatting

* Add  as by fauxpark's suggestion

Co-authored by: fauxpark

* Formatting

* Use boolean values instead of numerical

Co-authored-by: Ryan <fauxpark@gmail.com>

* Edit documentation formatting

Co-authored-by: Ryan <fauxpark@gmail.com>

* Remove comment

Co-authored-by: Ryan <fauxpark@gmail.com>

* Set RGB mode to DEFAULT macro at init

Co-authored-by: Ryan <fauxpark@gmail.com>

---------

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: zvecr <git@zvecr.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants